home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / CHIP Turkiye Ekim 2000.iso / prog / ekim / 04 / setup.exe / tack / common.js < prev    next >
Text File  |  2000-08-15  |  6KB  |  57 lines

  1. /*  Random number generator. If max=3 then function returns 1,2 or 3
  2. ===================================================================*/
  3. function getRandom(max) {return (Math.floor(Math.random()*max))+1;}
  4.  
  5.  
  6.  
  7. /*  Determine depth
  8. ===================================================================*/
  9.      if (DepthOfPage == 0) { depth = ""; }
  10. else if (DepthOfPage == 1) { depth = "../"; }
  11. else if (DepthOfPage == 2) { depth = "../../"; }
  12. else if (DepthOfPage == 3) { depth = "../../../"; }
  13. else if (DepthOfPage == 4) { depth = "../../../../"; }
  14. else if (DepthOfPage == 5) { depth = "../../../../../"; }
  15. else if (DepthOfPage == 6) { depth = "../../../../../../"; }
  16.  
  17.  
  18.  
  19. /*  Bookmarker
  20. ===================================================================*/
  21. if (navigator.appName == "Microsoft Internet Explorer") {
  22.    bookmarkline = "<A CLASS=\"sidebarb2\" HREF=\"javascript:window.external.AddFavorite(location.href,'pagetutor.com')\">Add this page to your Favorites</A>";
  23. } else {
  24.    bookmarkline = "<A CLASS=\"sidebarb2\" HREF=\"javascript:alert('Press CTRL+D to bookmark this page.')\">Bookmark this page</A>";
  25. }
  26.  
  27.  
  28.  
  29. /*  Large banner ads
  30. ===================================================================*/
  31. //online-  TopAdNumber = getRandom(1000); TopBannerAd = "<A HREF=\"http://kansas.valueclick.com/redirect?host=hs0164664&b=" + TopAdNumber + "&v=0\" TARGET=\"_top\"><IMG BORDER=\"0\" WIDTH=\"468\" HEIGHT=\"60\" ALT=\"Please visit our sponsors.\" SRC=\"http://kansas.valueclick.com/cycle?host=hs0164664&b=" + TopAdNumber + "&noscript=1\"></A>";
  32. //online-  BtmAdNumber = getRandom(1000); BtmBannerAd = "<A HREF=\"http://kansas.valueclick.com/redirect?host=hs0164664&b=" + BtmAdNumber + "&v=0\" TARGET=\"_top\"><IMG BORDER=\"0\" WIDTH=\"468\" HEIGHT=\"60\" ALT=\"Please visit our sponsors.\" SRC=\"http://kansas.valueclick.com/cycle?host=hs0164664&b=" + BtmAdNumber + "&noscript=1\"></A>";
  33.  
  34. // kills large banner ads
  35. // TopBannerAd = "<IMG SRC=\"" + depth + "tack/adpics/test01.gif\" WIDTH=\"468\" HEIGHT=\"60\" BORDER=\"0\">";
  36. // BtmBannerAd = "<IMG SRC=\"" + depth + "tack/adpics/test01.gif\" WIDTH=\"468\" HEIGHT=\"60\" BORDER=\"0\">";
  37.  
  38.  
  39. //offline-
  40. AdLine = new Array();
  41. AdLine[1]  = "<A HREF=\"http://service.bfast.com/bfast/click?bfmid=12768212&siteid=22315569&bfpage=home\" TARGET=\"_top\"><IMG SRC=\"" + depth + "tack/adpics/nomonthlyfees_468x60_" + getRandom(2) + ".gif\" BORDER=\"0\" WIDTH=\"468\" HEIGHT=\"60\" ALT=\"www.NoMonthlyFees.com\"></A>";
  42. AdLine[2]  = "<a href=\"http://www.commission-junction.com/track/track.dll?AID=14617&PID=517001&URL=http%3A%2F%2Fwww%2Eanimfactory%2Ecom\" target=\"_top\"><img src=\"" + depth + "tack/adpics/animationfactory_468x60_" + getRandom(2) + ".gif\" width=\"468\" height=\"60\" alt=\"Free Animations\" border=\"0\"></a>";
  43. AdLine[3]  = "<a href=\"http://www.commission-junction.com/track/track.dll?AID=446071&PID=517001&URL=http%3A%2F%2Fwww%2Etv\" target=\"_top\"><img src=\"" + depth + "tack/adpics/dottv_468x60_" + getRandom(2) + ".gif\" width=\"468\" height=\"60\" alt=\"What's the Coolest Domain?\" border=\"0\"></a>";
  44. AdLine[4]  = "<A HREF=\"http://triton.whitelakeweb.com/~tina/cgi-bin/refid.cgi?id=webtutor\" TARGET=\"_top\"><IMG SRC=\"" + depth + "tack/adpics/affordablehost_468x60_" + getRandom(2) + ".gif\" WIDTH=\"468\" HEIGHT=\"60\" BORDER=\"0\" ALT=\"Click here for affordable hosting.\"></A>";
  45. AdLine[5]  = "<A HREF=\"http://www.notetab.com/pwd.htm\" TARGET=\"_top\"><IMG SRC=\"" + depth + "tack/adpics/notetab_468x60_1.gif\" WIDTH=\"468\" HEIGHT=\"60\" BORDER=\"0\" ALT=\"Try an award winning text editor.\"></A>";
  46. AdLine[6]  = "<A HREF=\"http://www.marketingtips.com/t.cgi/46811/\" TARGET=\"_top\"><IMG SRC=\"" + depth + "tack/adpics/marketingtips_468x60_" + getRandom(3) + ".gif\" WIDTH=\"468\" HEIGHT=\"60\" BORDER=\"0\" ALT=\"Click here to visit our sponsor.\"></A>";
  47. AdLine[7]  = "<A HREF=\"http://www.amazon.com/exec/obidos/redirect-home/professionaweb02\" TARGET=\"_top\"><IMG SRC=\"" + depth + "tack/adpics/amazonbooks_468x60_" + getRandom(2) + ".gif\" WIDTH=\"468\" HEIGHT=\"60\" BORDER=\"0\" ALT=\"Click here to visit our sponsor.\"></A>";
  48. AdLine[8]  = "<A HREF=\"http://www.amazon.com/exec/obidos/redirect-home/professionaweb02\" TARGET=\"_top\"><IMG SRC=\"" + depth + "tack/adpics/amazonmusic_468x60_" + getRandom(2) + ".gif\" WIDTH=\"468\" HEIGHT=\"60\" BORDER=\"0\" ALT=\"Click here to visit our sponsor.\"></A>";
  49. AdLine[9]  = "<a href=\"http://www.commission-junction.com/track/track.dll?AID=12817&PID=517001&URL=http%3A%2F%2Fwww%2Einternetcharges%2Ecom\" target=\"_top\"><img src=\"" + depth + "tack/adpics/internetcharges_468x60_" + getRandom(3) + ".gif\" width=\"468\" height=\"60\" alt=\"Credit card processing made easy\" border=\"0\"></a>";
  50. AdLine[10] = "<a href=\"http://www.commission-junction.com/track/track.dll?AID=10346&PID=517001&URL=http%3A%2F%2Fwww%2Ecj%2Ecom%2FAffiliate%2Findex%2Easp\" target=\"_top\"><img src=\"" + depth + "tack/adpics/commissionjunction_468x60_" + getRandom(3) + ".gif\" width=\"468\" height=\"60\" alt=\"Commission Junction - Get Paid!\" border=\"0\"></a>";
  51. AdLine[11] = "<a href=\"http://www.commission-junction.com/track/track.dll?AID=512361&PID=517001&URL=http%3A%2F%2Fwww%2Egifart%2Ecom\" target=\"_top\"><img src=\"" + depth + "tack/adpics/gifart_468x60_" + getRandom(2) + ".gif\" width=\"468\" height=\"60\" alt=\"Clipart And Web Ready Graphics.\" border=\"0\"></a>";
  52.  
  53. TopBannerAd = AdLine[getRandom(11)];
  54. BtmBannerAd = AdLine[getRandom(11)];
  55.  
  56.  
  57.